home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
wildhearts_stage_dive.swf
/
scripts
/
DefineSprite_53
/
frame_9
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
1KB
|
77 lines
function onEnterFrame()
{
var _loc2_ = _root.getBytesLoaded() / _root.getBytesTotal();
if(getTimer() >= startTime + 100)
{
animDone = true;
}
if(Math.ceil(bar._width) >= width && animDone && !endOnce)
{
trace("loaded!");
endOnce = true;
stopSparks = true;
delete onEnterFrame;
gotoAndStop("out");
play();
}
else
{
setProgress(_loc2_);
}
}
function fadeOut()
{
setProgress(progress);
this._alpha -= 5;
if(this._alpha <= -50)
{
this._visible = false;
_parent.play();
}
}
function makeSpark()
{
}
function sparkControl()
{
if(!stopSparks)
{
this._y += this.grav;
this._x += this.wind;
this.grav *= gravity;
this._alpha -= this.grav;
this._rotation += this.spin;
if(this._alpha <= 0)
{
this.removeMovieClip();
}
}
else
{
this.removeMovieClip();
}
}
function setProgress(p)
{
bar._width = (bar._width * 2 + p * width) / 3;
if(progress != 1)
{
makeSpark();
}
}
width = 200;
i = 0;
gravity = 1.3;
animDone = true;
startTime = getTimer();
if(this._name == "loader_mc")
{
myName = _global.language.loadingAssets;
}
else
{
myName = _global.language.initLevel;
}
setProgress(0);
stop();